package Day16;

import java.awt.*;
import java.net.SocketTimeoutException;
import java.util.Scanner;

public class Text1 {

    public static void main(String[] args) {

        //二进制，八进制，十六进制转成十进制是多少呀
       /* System.out.println(0B1100);
        System.out.println(02456);
        System.out.println(0XA45);*/
/*
        String n1 = "124.0";
        double d1 = Integer.parseUnsignedInt(n1);
        System.out.println(d1);*/

         Scanner sc = new Scanner(System.in);
       /* while (true) {
            System.out.println("请输入保国的芝麻信用分");
            int score = sc.nextInt();
            if(score == 100){
                System.out.println("信用良好");
                continue;
            }else if(score > 80 && score <= 90){
                System.out.println("信用优秀");
                continue;
            }else if(score >= 60 && score <= 80){
                System.out.println("信用一般");
                continue;
            }else{
                System.out.println("信用不合格");
                continue;
            }
        }*/
       /* System.out.println("请输入当前的月份");
        int month = sc.nextInt();
        System.out.println("请输入当前的年龄");
        int age = sc.nextInt();
        if(month >=4 && month <= 10){
            if(age >= 18 && age <= 60){
                System.out.println(60);
            }else if(age < 18){
                System.out.println("半价");
            }else if(age > 60){
                System.out.println("三分之一");
            }
        }else{
            if(age >= 18 && age <= 60){
                System.out.println(40);
            }else{
                System.out.println(20);
            }
        }*/


        /*System.out.println("请输入小写的英文字母");
        char ch = sc.next().charAt(0);
        switch(ch){
            case 'a':
                System.out.println('A');
                break;
            case 'b':
                System.out.println('B');
                break;
            case 'c':
                System.out.println('C');
                break;
            case 'd':
                System.out.println('D');
                break;
            default:
                System.out.println("others");
                break;
        }
        */


       /* System.out.println("请输入学生的成绩");
        int score = sc.nextInt();
        switch((int)(score / 60)){
            case 1:
                System.out.println("及格了");
                break;
            case 0:
                System.out.println("不及格");
                break;
            default:
                System.out.println("输入有误");
                 break;
        }
        */
      /*  System.out.println("请输入月份");
        int month = sc.nextInt();
        switch(month){
            case 3:
            case 4:
            case 5:
                System.out.println("春季");
                break;
            case 6:
            case 7:
            case 8:
                System.out.println("夏季");
                break;
            case 9:
            case 10:
            case 11:
                System.out.println("秋季");
                break;
            case 12:
            case 13:
            case 1:
                System.out.println("冬季");
                break;
            default:
                System.out.println("季节输入有误");
                break;
        }
*/
        //打印1到100之间所有是9的倍数的整数
        int count =0;
        int sum = 0;
        for(int i = 1; i <= 100; i++){
           if((i % 9) == 0){
               System.out.println(i);
               count++;
               sum += i;
           }
        }
        System.out.println("9的倍数一共有" + count+"个");
        System.out.println("总和是" + sum);



    }





}
